#pragma once
#include "ObjectDetector.h"
#include <opencv2/opencv.hpp>
#include <string>

class ZhangsFingerRootsDetector : virtual ObjectDetector
{
private:
    //finger roots [x1,y1,x2,y2,x3,y3]
    int fingerConner[6] = {0};
    cv::Mat img;
    int palm_segment(const cv::Mat &img, cv::Mat &result, std::string &filename);
    int detect_fincon(cv::Mat &img, int result[6], std::string &filename);

public:
    ZhangsFingerRootsDetector(cv::Mat &img);
    ~ZhangsFingerRootsDetector();
    ObjectDetector *detect(std::string &filename);
    int getDetectedArr(int *result);
};
